Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jun 30, 2025

Fixes #143128.

We could likely use tcx.def_descr in more places (and therefore remove more descr methods). If it's something that we want to do, I can send a follow-up.

r? @oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 30, 2025
@rustbot

This comment has been minimized.

Comment on lines 9 to 12
help: you might have meant to open the body of the closure, instead of enclosing the closure in a block
|
LL - fn main() { | b : [str; _] | }
LL + fn main() | b : [str; _] | { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also lmao this diagnostic is funnily wrong

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's funnily wrong but has to do with the recovery for { |x| } which is apparently a ruby style closure

@rustbot

This comment has been minimized.

@compiler-errors
Copy link
Member

compiler-errors commented Jun 30, 2025

Please squash the third commit into the first. There's no reason we need to have a separate commit just to add a test, especially if it's not demonstrating the behavior before the fix (which this one doesn't really need).

@GuillaumeGomez
Copy link
Member Author

Done.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

Didn't think about rustdoc-ui tests. Oh well, hopefully I covered everything now.

@compiler-errors
Copy link
Member

@bors r=oli-obk rollup

@bors
Copy link
Collaborator

bors commented Jul 1, 2025

📌 Commit 74fda50 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2025
bors added a commit that referenced this pull request Jul 1, 2025
Rollup of 8 pull requests

Successful merges:

 - #143125 (Disable f16 on Aarch64 without neon for llvm < 20.1.1)
 - #143156 (inherit `#[align]` from trait method prototypes)
 - #143178 (rustdoc default faviocon)
 - #143234 (Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr`)
 - #143245 (mbe: Add tests and restructure metavariable expressions)
 - #143257 (Upgrade dependencies in run-make-support)
 - #143263 (linkify CodeSuggestion in doc comments)
 - #143264 (fix: Emit suggestion filename if primary diagnostic span is dummy)

Failed merges:

 - #143251 (bootstrap: add build.tidy-extra-checks option)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e2ea213 into rust-lang:master Jul 1, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 1, 2025
rust-timer added a commit that referenced this pull request Jul 1, 2025
Rollup merge of #143234 - GuillaumeGomez:ice-143128, r=oli-obk

Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr`

Fixes #143128.

We could likely use `tcx.def_descr` in more places (and therefore remove more `descr` methods). If it's something that we want to do, I can send a follow-up.

r? `@oli-obk`
@GuillaumeGomez GuillaumeGomez deleted the ice-143128 branch July 1, 2025 08:33
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 1, 2025
…r=oli-obk

Remove `ItemKind::descr` method

Follow-up of rust-lang#143234.

After this PR is merged, it will remain two `descr` methods:

 * `hir::GenericArg::descr`
 * `hir::AssocItemConstraintKind::descr`

For both these enums, I don't think there is the right equivalent in `hir::DefKind` so unless I missed something, we can't remove these two methods because we can't convert these enums into `hir::DefKind`.

r? `@oli-obk`
rust-timer added a commit that referenced this pull request Jul 1, 2025
Rollup merge of #143279 - GuillaumeGomez:rm-itemkind-descr, r=oli-obk

Remove `ItemKind::descr` method

Follow-up of #143234.

After this PR is merged, it will remain two `descr` methods:

 * `hir::GenericArg::descr`
 * `hir::AssocItemConstraintKind::descr`

For both these enums, I don't think there is the right equivalent in `hir::DefKind` so unless I missed something, we can't remove these two methods because we can't convert these enums into `hir::DefKind`.

r? `@oli-obk`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: not yet implemented: Expr
6 participants